package com.klun.designMode.builder;

/**
 * 建造者模式-具体建造者
 */
public class ConcreteBuilder implements ICarBuilder {
    Car car;
    public ConcreteBuilder(Car car) {
        this.car = car;
    }
    @Override
    public void buildWheel() {
        car.setWheel("轮子");
    }
    @Override
    public void buildSkeleton() {
        car.setSkeleton("车身结构");
    }
    @Override
    public void buildEngine() {
        car.setEngine("发动机");
    }
    @Override
    public Car buildCar() {
        return this.car;
    }
}
